#ifndef CCONTROL_H_
#define CCONTROL_H_

#include "cLDAPResolver.h"
#include "clogger.h"
#include "cQuickPlaceDB.h"
#include "SortableObjArray.h"
#include "cNotesFieldInfo.h"

class cControl : public CObject
{

    DECLARE_DYNAMIC( cControl)

public:        // object creation/destruction
   cControl();
   virtual ~cControl();


public:        // attribute modification
	BOOL fIsNotesInitialized;				// set to true if initialized properly
	LNNotesSession   session;				// Notes session pointer
	
	LNDatabase       NABdb;				// Global addressbook
	CHAR szNotesServerCN[256];			// Common name of notes server being migrated

	CString m_strDirectoryPath;			// Name of the temporary directory
	CString m_strQuickPlacePath;			// Name of the temporary directory

//	CStringArray cstrArFolderNames;

	CString	m_strNotesIni;
	CString	m_strNotesPwd;

	CString	m_strLDAPPath;

	CString	m_strQPName;

	LPVOID lpMapAddress;
	HANDLE hMapFile;
	CString m_strTempNotesIni;
//	BOOL	m_bLocal;
	BOOL	m_bDirectorySecurity;
	BOOL m_bDoLog;
	//CSortableObArray m_cObjFilearray;

	
//	CString m_strAppointments;
//	CString m_strDiscussions;
//	BOOL m_bMigrateCalendar;

	COleDateTime codtCalendarThreshold;
	BOOL bUseCalendarThreshold;

	COleDateTime codtDiscussionThreshold;
	BOOL bUseDiscussionThreshold;

	cLogger *pLog;
	cLogger *pDebugLog;
	
	cLogger *pFileLog;
	cLDAPResolver *pResolver;

	CString	m_strContainerType;
	CString	m_strOwnerAccount;
	CString	m_strOwnerEMail;
	BSTR bstrContainer;
	BOOL	m_bMergeFolders;
	BOOL	m_bSubRoomSecurity;
	CString	m_strDocumentLibraryName;
	CObArray m_objQuickPlaces;
	cQuickPlaceDB *pdb;
	BSTR bstrSiteContainerRoot;
	BSTR bstrSiteTemplate;

	BOOL m_bShowInSiteDirectory;
	BOOL m_bSubRoomListing;

	CSortableObArray  m_objUsersFromFile;
	CString m_strUserDataFileName; 

public:        // members
	BOOL m_bThrowNotesErrors;
	CString m_strCustomProperties;
	BOOL m_bUseFolderForMoreThanTwoAttachments;
	BOOL	m_bUseFoldersForAllItems;
	BOOL m_bUseDescriptionForBody;
	int NrOfDocs;
	int NrOfListItems;
	int m_nBias;
	BOOL m_bAdvanced;
	CString m_strCurDir;
	CObArray m_objArrayCustomFields;
	int m_nLocale;


private:       // attributes
};

#endif

